package com.augurit.wf.common.extmodel;


/**
 * 流程版本树节点工厂
 *
 */
public class ProcessVersionTreeNodeFactory extends ExtTreeNodeFactory {

	/**
	 * @param type 节点类型
	 * @param value 节点值，主要用来展开
	 */
	@Override
	public ProcessReleaseTreeNode createTreeNode(String type, String value) {
		//根节点
		if(ProcessReleaseTreeNode.ROOT_NODE.equals(type)){
			return new ProccessReleaseRootTreeNode();
		}
		//流程节点
		else if(ProcessReleaseTreeNode.PROCESS_NODE.equals(type)){
			return new ProcessNameTreeNode(value);
		}
		else if(ProcessReleaseTreeNode.VERSION_NODE.equals(type)){
			return null;
		}
		else{
			throw new RuntimeException("");
		}
	}

}
